import 'package:environmental_les_app/common/routes/route_names.dart';
import 'package:environmental_les_app/common/style/colours.dart';
import 'package:environmental_les_app/common/utils/utils.dart';
import 'package:flutter_clx_base/flutter_clx_base.dart';

class ItemMemberWidget extends StatelessWidget {
  const ItemMemberWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () => Get.toNamed(AppRoutes.personalInfoPage),
      child: Container(
        margin: const EdgeInsets.only(top: 10, left: 10, right: 10),
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(8),
        ),
        padding: const EdgeInsets.all(12),
        child: Row(
          children: [
            ImageWidget.loadAssetImage("ic_book_people", height: 40, width: 40),
            hGap10,
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Row(
                    children: [
                      Container(
                          padding: const EdgeInsets.symmetric(horizontal: 6),
                          decoration: BoxDecoration(
                            color: Colours.bgF4F7FE,
                            border: Border.all(
                              color: Colours.lineB7C0D7,
                              width: 0.8,
                            ),
                            borderRadius: BorderRadius.circular(4),
                          ),
                          child: const Text("大队长",
                              style: TextStyle(
                                color: Colours.appMain,
                                fontSize: 13,
                              ))),
                      hGap10,
                      const Text(
                        "张三丰",
                        style: TextStyle(
                            color: Colours.textC4C,
                            fontSize: 16,
                            fontWeight: FontWeight.w500),
                      ),
                    ],
                  ),
                  vGap8,
                  const Text(
                    "准格尔旗环境监察大队",
                    style: TextStyle(
                        color: Colours.text09C,
                        fontSize: 12,
                        fontWeight: FontWeight.normal),
                  ),
                ],
              ),
            ),
            InkWell(
                onTap: () {
                  selectCallorCopy("15512341234");
                },
                child: ImageWidget.loadAssetImage("ic_book_phone",
                    width: 40, height: 40)),
          ],
        ),
      ),
    );
  }
}
